package com.honey.entity;

import java.awt.Color;

import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;

/**
 * 二维码实体
 * @author honey
 *
 */
public class TwoCode {

	/**
	 * 二维码名称
	 */
	private String codeName = "鱼乐";
	
	/**
	 * 二维码内容
	 */
	private String codeContent = "我是鱼乐";
	
	/**
	 * 二维码尺寸
	 */
	private int codeSize = 300;
	
	/**
	 * 二维码边距
	 */
	private int codePadding = 2;
	
	/**
	 * 二维码容错率
	 * L(7%),M(15%),Q(25%),H(30%)
	 */
	private ErrorCorrectionLevel codeErr = ErrorCorrectionLevel.L;
	
	/**
	 * 二维码图片类型
	 */
	private String picType = "png";
	
	/**
	 * 二维码容生成地址
	 */
	private String codeCreateUrl = "D:/yule";
	
	/**
	 * 是否开启log打印
	 */
	private boolean logoFlag = false;
	
	/**
	 * logo地址
	 */
	private String logoUrl;
	
	/**
	 * 二维码配字符
	 */
	private boolean codeFontFlag = false;
	
	/**
	 * 二维码配字符
	 */
	private String codeFontContent = "鱼乐";
	
	/**
	 * 字体颜色
	 */
	private Color fontColor = Color.black;
	
	/**
	 * 字体大小
	 */
	private int fontSize = 15;

	public String getCodeName() {
		return codeName;
	}

	public void setCodeName(String codeName) {
		this.codeName = codeName;
	}

	public String getCodeContent() {
		return codeContent;
	}

	public void setCodeContent(String codeContent) {
		this.codeContent = codeContent;
	}

	public int getCodeSize() {
		return codeSize;
	}

	public void setCodeSize(int codeSize) {
		this.codeSize = codeSize;
	}

	public int getCodePadding() {
		return codePadding;
	}

	public void setCodePadding(int codePadding) {
		this.codePadding = codePadding;
	}

	public ErrorCorrectionLevel getCodeErr() {
		return codeErr;
	}

	public void setCodeErr(ErrorCorrectionLevel codeErr) {
		this.codeErr = codeErr;
	}

	public String getPicType() {
		return picType;
	}

	public void setPicType(String picType) {
		this.picType = picType;
	}

	public String getCodeCreateUrl() {
		return codeCreateUrl;
	}

	public void setCodeCreateUrl(String codeCreateUrl) {
		this.codeCreateUrl = codeCreateUrl;
	}

	public boolean isLogoFlag() {
		return logoFlag;
	}

	public void setLogoFlag(boolean logoFlag) {
		this.logoFlag = logoFlag;
	}

	public String getLogoUrl() {
		return logoUrl;
	}

	public void setLogoUrl(String logoUrl) {
		this.logoUrl = logoUrl;
	}

	public boolean isCodeFontFlag() {
		return codeFontFlag;
	}

	public void setCodeFontFlag(boolean codeFontFlag) {
		this.codeFontFlag = codeFontFlag;
	}

	public String getCodeFontContent() {
		return codeFontContent;
	}

	public void setCodeFontContent(String codeFontContent) {
		this.codeFontContent = codeFontContent;
	}

	public Color getFontColor() {
		return fontColor;
	}

	public void setFontColor(Color fontColor) {
		this.fontColor = fontColor;
	}

	public int getFontSize() {
		return fontSize;
	}

	public void setFontSize(int fontSize) {
		this.fontSize = fontSize;
	}

	@Override
	public String toString() {
		return "{\"codeName\"=\"" + codeName + "\", \"codeContent\"=\"" + codeContent + "\", \"codeSize\"=\"" + codeSize
				+ "\", \"codePadding\"=\"" + codePadding + "\", \"codeErr\"=\"" + codeErr + "\", \"picType\"=\""
				+ picType + "\", \"codeCreateUrl\"=\"" + codeCreateUrl + "\", \"logoFlag\"=\"" + logoFlag
				+ "\", \"logoUrl\"=\"" + logoUrl + "\", \"codeFontFlag\"=\"" + codeFontFlag
				+ "\", \"codeFontContent\"=\"" + codeFontContent + "\", \"fontColor\"=\"" + fontColor
				+ "\", \"fontSize\"=\"" + fontSize + "\"}";
	}

}
